<?php

	class EventItem implements iModel {
		
		public $eventItemId;
		public $eventId;
		public $name;
		public $startDate;
		public $endDate;
		public $description;
		public $regionId;
		public $eventItemUser;
		
		
		public function __construct() {
			$this->setEventItemUser(new EventItemUser());
		}
		
		public function getEventItemId() {
			 return $this->eventItemId; 
		}
		 
		public function getEventId() {
			 return $this->eventId; 
		}
		 
		public function getName() {
			 return $this->name; 
		}
		 
		public function getStartDate() {
			 return $this->startDate; 
		}
		 
		public function getEndDate() {
			 return $this->endDate; 
		}
		 
		public function getDescription() {
			 return $this->description; 
		}
		 
		public function getRegionId() {
			 return $this->regionId; 
		}
		
		public function getEventItemUser() {
			 return $this->eventItemUser; 
		}
		 
		public function setEventItemId($eventItemId) {
			 $this->eventItemId = $eventItemId; 
		} 
		
		public function setEventId($eventId) {
			 $this->eventId = $eventId; 
		}
		 
		public function setName($name) {
			 $this->name = $name; 
		}
		 
		public function setStartDate($startDate) {
			 $this->startDate = $startDate; 
		} 
		
		public function setEndDate($endDate) {
			 $this->endDate = $endDate; 
		}
		 
		public function setDescription($description) {
			 $this->description = $description; 
		}
		 
		public function setRegionId($regionId) {
			 $this->regionId = $regionId; 
		} 
		
		public function setEventItemUser($eventItemUser) {
			 $this->eventItemUser = $eventItemUser; 
		}


		public function JSONToObject($eventItemJSON) {
			$this->setEventItemId($eventItemJSON->eventItemId);
			$this->setEventId($eventItemJSON->eventId);		
			$this->setDescription($eventItemJSON->description);	
			$this->setName($eventItemJSON->name);
			$this->setStartDate($eventItemJSON->startDate);
			$this->setEndDate($eventItemJSON->endDate);
			$this->setRegionId($eventItemJSON->regionId);
			$eventItemUser = new EventItemUser();
			$this->setEventItemUser($eventItemUser->JSONToObject($eventItemJSON->eventItemUser));
		}
	}	

?>